/**
 * 
 */
package study;

/**
 * @author admin
 *
 */
import java.util.Vector;
public class TestVector {
	
	Vector vt=new Vector();
	
	public void addElement(){
		for(int i=0;i<10;i++){
			vt.add(i);
		}
	}
	
	public Object getElement(int index){
		if(index<vt.size()){
		Object i=vt.get(index);
		
		System.out.println(i);
		return i;
		}
		return null;
	}
	
	public void deleteElement(int index){
		if(index<vt.size()){
		Object o=vt.remove(index);
		System.out.println(o);
		}
		return;
	}
	
	public void getAllElement(){
		for(Object o:vt){
			System.out.println(o);
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		// TODO Auto-generated method stub
		TestVector tv=new TestVector();
		tv.addElement();
		Object o=tv.getElement(5);
		
		tv.deleteElement(4);
		tv.getAllElement();
	}

}
